package com.sunlands.zlcx.usercenter.constant;

/**
 * Created by ajGeGe
 */
public enum ResultStatus {

    SUCCESS("success", "成功", 1),
    FAILED("failed", "失败", 0);

    ResultStatus(String info, String tips, int code) {
        this.info = info;
        this.tips = tips;
        this.code = code;
    }

    private String info;
    private String tips;
    private int code;

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static ResultStatus getFormIdStatusByCode(int code) {
        for (ResultStatus field : ResultStatus.values()) {
            if (code == field.getCode()) {
                return field;
            }
        }
        return null;
    }
}
